package com.example.yongzhenguan.myfirst;



import android.app.Fragment;
import android.app.FragmentManager;
import android.os.SystemClock;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        FragmentManager fm = getFragmentManager();
        Fragment fragment = fm.findFragmentById(R.id.fragmentContainer);

        if (fragment == null) {
            fragment = new ShowFragment();
            fm.beginTransaction().add(R.id.fragmentContainer,fragment).commit();
            System.out.print("dadg");




        }

    }
}
